<?php
namespace User\Form;

use Zend\Form\Form;

class UsersRegister extends Form
{
    public function __construct($config, $name = null)
    {
	parent::__construct('users_register');

	$this->setAttribute('method', 'post');

	$this->add(array(
	    'name' => 'role',
	    'type' => 'Zend\Form\Element\Radio',
	    'options' => array(
		'value_options' => array(
		    'applicant' => 'szukam pracy',
		    'operator'	=> 'oferuję pracę',
		),
	    ),
	));
	
	$this->add(array(
	    'name' => 'email',
	    'type' => 'Zend\Form\Element\Text',
	    'attributes' => array(
		'placeholder' => 'e-mail'
	    ),
	));

	$this->add(array(
	    'name' => 'password_raw',
	    'type' => 'Zend\Form\Element\Password',
	    'attributes' => array(
		'placeholder' => 'hasło'
	    ),
	));

	$this->add(array(
	    'name' => 'rules',
	    'type' => 'Zend\Form\Element\Checkbox',
	    'options' => array(
		    'label' => '',
		    'checked_value' => '1',
		    'unchecked_value' => '0'
	    ),
	));

	$this->add(array(
	    'name' => 'notify',
	    'type' => 'Zend\Form\Element\Checkbox',
	    'options' => array(
		    'label' => '',
		    'checked_value' => '1',
		    'unchecked_value' => '0'
	    ),
	));

	$this->add(array(
	    'name' => 'register',
	    'attributes' => array(
		    'type' => 'submit',
		    'value' => 'Zarejestruj się',
		    'class' => 'btn_green_search',
	    ),
	));
    }
}